﻿using com.guojin.mj.net.message.login;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class CheckItem : MonoBehaviour {

    public Text name, id, gold;
    public Button yes, no;
    public void Set(CheckNumberInfo cl, string cuid)
    {
        id.text = cl.Id.ToString();
        gold.text = cl.Gold.ToString();
        name.text = cl.Username.ToString();
        yes.onClick.AddListener(delegate {
            MessageManager.GetInstance().SendMsg786(0, int.Parse(id.text), cuid);
            Destroy(this.gameObject);
        });
        no.onClick.AddListener(delegate {
            MessageManager.GetInstance().SendMsg786(1, int.Parse(id.text), cuid);
            Destroy(this.gameObject);
        });
    }
    public void Set(LMMunberInfo cl, string cuid)
    {
        id.text = cl.clubid.ToString();
        gold.text = cl.gold.ToString();
        name.text = cl.clubname.ToString();
        yes.onClick.AddListener(delegate {
            MessageManager.GetInstance().SendMsg7114(0, int.Parse(id.text), cuid);
            Destroy(this.gameObject);
        });
        no.onClick.AddListener(delegate {
            MessageManager.GetInstance().SendMsg7114(1, int.Parse(id.text), cuid);
            Destroy(this.gameObject);
        });
    }
}
